#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <gamelevel.h>
#include <memory>

namespace Ui {
class MainWindow;
}

class QMediaPlaylist;
class QKeyEvent;
class QPaintEnvent;
class QPushButton;
class QMediaPlayer;
class MainWindow : public QMainWindow
{
    Q_OBJECT

    std::unique_ptr<GameLevel> level;
    std::string source;
public:
    explicit MainWindow(QWidget *parent, std::string const& source);
    ~MainWindow();

    void keyPressEvent(QKeyEvent*);
    void paintEvent(QPaintEvent*);
    void restartClicked();
private:
    Ui::MainWindow *ui;
    QPushButton* restartButton;
    QMediaPlayer* mediaPlayer;
    QMediaPlaylist* playList;
};

#endif // MAINWINDOW_H
